-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WOL] Implement wake on LAN command line tool #19206
Conversation
} | ||
|
||
#[test] | ||
fn verify_args_parse() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to split this testcase to several testcases, each one for a single argument or scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you help answer below questions in PR description:
|
|
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw ms_conflict -f |
@@ -362,6 +362,15 @@ CROSS_COMPILE_FLAGS := CGO_ENABLED=1 GOOS=linux GOARCH=$(GOARCH) CROSS_COMPILE=$ | |||
|
|||
endif | |||
|
|||
ifeq ($(CROSS_BUILD_ENVIRON),y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if you understand CROSS_BUILD_ENVIRON correctly.
Do you try to build arm SONiC image on amd64 machine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I'm trying install toolchain if user want to do cross build.
Hi @yxieca, cloud you help merge this PR? |
Why I did it Implement wake on LAN command line tool to send magic packets to target interface with extra parameters like mac address, password, count and interval. How I did it Setup rust compile environment, write code and test to implement the tool. Set raw socket capacity for wol binary when build image. How to verify it Unit test and manually test with packet capture.
Why I did it Implement wake on LAN command line tool to send magic packets to target interface with extra parameters like mac address, password, count and interval. How I did it Setup rust compile environment, write code and test to implement the tool. Set raw socket capacity for wol binary when build image. How to verify it Unit test and manually test with packet capture.
Cherry-pick PR to 202405: #21136 |
Why I did it Implement wake on LAN command line tool to send magic packets to target interface with extra parameters like mac address, password, count and interval. How I did it Setup rust compile environment, write code and test to implement the tool. Set raw socket capacity for wol binary when build image. How to verify it Unit test and manually test with packet capture. Co-authored-by: Wenda Chu <[email protected]>
Cherry-pick to 202405 successfully, however, the labels are not updated, |
Why I did it
Implement wake on LAN command line tool to send magic packets to target interface with extra parameters like mac address, password, count and interval.
Work item tracking
How I did it
Setup rust compile environment, write code and test to implement the tool.
Set raw socket capacity for wol binary when build image.
How to verify it
Unit test and manually test with packet capture.
wendachu@wenda-dev-vm:~/sonic-buildimage/src/sonic-nettools$ cargo test
Finished
test
profile [unoptimized + debuginfo] target(s) in 0.02sRunning unittests src/main.rs (target/debug/deps/wol-a43f4ac2d14649cf)
running 9 tests
test wol::tests::test_build_magic_packet_without_password ... ok
test wol::tests::test_build_magic_packet ... ok
test wol::tests::test_is_ipv4_address_valid ... ok
test wol::tests::test_is_mac_string_valid ... ok
test wol::tests::test_parse_password ... ok
test wol::tests::test_parse_mac_addr ... ok
test wol::tests::test_parse_ipv4_addr ... ok
test wol::tests::test_parse_target_macs ... ok
test wol::tests::verify_args_parse ... ok
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)